package CreationalPatterns.Single;
/*
登记式/静态内部类
 */
public class SingleObject5 {

  private static class SingletonHolder{
    private static final SingleObject5 instance = new SingleObject5();
  }

  private SingleObject5(){};

  public static final SingleObject5 getInstance(){
    return SingletonHolder.instance;
  }

  public void show(){
    System.out.println("登记式/静态内部类");
  }
}
